Add :account_slug prefix to account, my/pins and my/timezone API doc paths#2889
Open
rogeriopvl wants to merge 2 commits intobasecamp:mainfrom
Open
Conversation
The /account/* routes (settings, join_code, entropy, exports) and /my/pins are mounted inside the per-account scope (see namespace :account and namespace :my in config/routes.rb). They are reachable in production as /:account_slug/account/... and /:account_slug/my/... — the same convention the surrounding paths in these files already follow (e.g. POST /:account_slug/cards/:card_number/pin, PUT /:account_slug/boards/:board_id/entropy, POST /:account_slug/users/:user_id/data_exports). Without the prefix the client hits the root web app and gets 302'd to /session/menu, which in turn yields 406 Not Acceptable when Accept: application/json is set.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the API documentation to consistently include the /:account_slug URL prefix for endpoints that are accessed within an account-scoped path.
Changes:
- Fixes the documented path for
GET /my/pinstoGET /:account_slug/my/pins. - Fixes the documented paths for account settings/join code/entropy endpoints to include
/:account_slug. - Fixes the documented paths for account exports create/show endpoints to include
/:account_slug.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| docs/api/sections/pins.md | Corrects the pins index endpoint to include the account slug prefix. |
| docs/api/sections/exports.md | Corrects account export create/show endpoints to include the account slug prefix. |
| docs/api/sections/account.md | Corrects account settings, join code, and entropy endpoints to include the account slug prefix. |
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
PATCH /my/timezone is mounted inside the per-account scope alongside /my/pins (see namespace :my in config/routes.rb). It is reachable in production as PATCH /:account_slug/my/timezone — without the prefix the client hits the root web app and gets 302'd to /session/menu, which in turn yields 406 Not Acceptable when Accept: application/json is set. Same fix as the previous commit on this branch; this one was missed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nine paths in
docs/api/sections/{account,exports,pins,identity}.mdare documented without the:account_slugprefix, but the routes are mounted inside the per-account scope (seenamespace :accountandnamespace :myinconfig/routes.rb). The other paths in the same files already use/:account_slug/...; this PR fixes the ones that don't.pins.mdGET /my/pinsGET /:account_slug/my/pinsaccount.mdGET /account/settingsGET /:account_slug/account/settingsaccount.mdGET /account/join_codeGET /:account_slug/account/join_codeaccount.mdPUT /account/join_codePUT /:account_slug/account/join_codeaccount.mdDELETE /account/join_codeDELETE /:account_slug/account/join_codeaccount.mdPUT /account/entropyPUT /:account_slug/account/entropyexports.mdPOST /account/exportsPOST /:account_slug/account/exportsexports.mdGET /account/exports/:idGET /:account_slug/account/exports/:ididentity.mdPATCH /my/timezonePATCH /:account_slug/my/timezoneAI Use Disclaimer: this issue was found by an AI coding agent while working on a project that uses the Fizzy API.